<template>
  <div class="tableCss">
    <el-table
      max-height="640"
      :data="tableData"
      border
      style="width: 100%"
      v-loading="loading">
      <el-table-column
        prop="enterpriseName"
        label="用工单位名称"
        min-width="300">
      </el-table-column>
      <el-table-column
        prop="name"
        label="姓名"
        min-width="100">
      </el-table-column>
      <el-table-column
        prop="identityNumber"
        label="身份证"
        min-width="180">
      </el-table-column>
      <el-table-column
        prop="job"
        label="工作岗位"
        min-width="180">
      </el-table-column>
      <el-table-column
        prop="classHour"
        label="学时"
        min-width="80">
      </el-table-column>
      <el-table-column
        prop="classHourStatus"
        label="学时是否达标"
        min-width="120">
        <template #default="scope">
          {{ data6Map[scope.row.classHourStatus] }}
        </template>
      </el-table-column>
      <el-table-column label="操作" align="center" fixed="right" width="280">
        <template slot-scope="scope">
          <el-button
          size="mini" type="text" @click="goToApproalBtn(scope.row)">放射工作人员职业健康培训考核申请表审核</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  props:{
    tableData:{
      type: Array,
      default:()=> [],
    },
    loading:{
      type: Boolean,
      default:()=> false,
    },
  },
  data(){
    return{
      data6Map:{
        0:'未达标',
        1:'达标',
      },
    }
  },
  methods:{
    goToApproalBtn(row){
      this.$emit('goToApproalBtn',row)
    },
  },
}
</script>

<style scoped lang="scss">
.tableCss{
  position: relative;
}
</style>